#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
    int nums[] = { 3,6,1,0 };
    
        int max = 0;
        int second = 0;
        int num = 0;
        for (int i = 0;i < 4;i++)
        {
            if (nums[i] > max)
            {
                second = max;
                max = nums[i];
                num = i;
            }
            else if (nums[i] > second)
            {
                second = nums[i];
            }
        }
        if (max >= (second * 2))
        {
            printf("%d\n", num);
        }
        else
            printf("-1");
        return 0;
}